package com.szzg10.pattern.strategy;

public abstract class Animal {

	private FlyBehavior flyBehavior;
	
	public void setFlyBehavior(FlyBehavior flyBehavior) {
		this.flyBehavior = flyBehavior;
	}
	
	public void fly() {
		flyBehavior.execute();
	}
	
	public abstract void sayName();
	
	public void sayHello() {
		sayName();
		fly();
	}
}
